package com.yan.demo.demo3;

/**
 * @author taoge
 * @Date 2024/8/8 15:03
 * @Description
 */
public class MyTask2 implements Runnable{
    private Stack stack;

    public MyTask2(Stack stack) {
        this.stack = stack;
    }

    @Override
    public void run() {
        while (true) {
            stack.consume();
        }
    }
}
